package com.financial.business.base.controller;

import com.financial.business.base.service.FinancialBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * @author WANGNING
 * @api {post}
 * @email wyn20140226@aliyun.com
 * @tar 用于检测该服务是否就绪
 * @date 2019/11/4 15:16
 * @apiGroup 所属服务
 * @apiVersion 2.0.0
 * @apiHeader {String} null 无
 * @apiParam {String} null 无
 * @apiSuccess {String} succeed 就绪
 */
@RestController
@RequestMapping("/financial")
public class FinancialBaseController {

    @Autowired
    private FinancialBaseService financialBaseService;
    /**
     * 公共报备
     * @param request
     * @return
     */
    @RequestMapping("/report")
    public String report(HttpServletRequest request) {

        return financialBaseService.report(request);
    }

    /**
     * 公共支付
     * @param request
     * @return
     */
    @RequestMapping("/pay")
    public String pay(HttpServletRequest request) {

        return financialBaseService.pay(request);
    }

    /**
     * 公共分账
     * @param request
     * @return
     */
    @RequestMapping("/split")
    public String split(HttpServletRequest request) {

        return financialBaseService.split(request);
    }

    /**
     * 公共退款
     * @param request
     * @return
     */
    @RequestMapping("/refund")
    public String refund(HttpServletRequest request) {

        return financialBaseService.refund(request);
    }

    /**
     * 公共提现
     * @param request
     * @return
     */
    @RequestMapping("/withdrawal")
   public String withdrawal(HttpServletRequest request) {

        return financialBaseService.withdrawal(request);
    }

    /**
     * 公共转账/代付
     * @param request
     * @return
     */
    @RequestMapping("/payment")
    public String payment(HttpServletRequest request) {

        return financialBaseService.payment(request);
    }


    /**
     * 公共查询入口
     *
     * @param request
     * @return
     */
    @RequestMapping("/query")
    public String query(HttpServletRequest request) {

        return financialBaseService.query(request);
    }
}
